public interface TraceWriter
The TraceWriter
interface abstracts the details of trace message output. The
TraceWriter
uses its enabled
method to advertise whether or not the
print
and println methods will have any effect. Users of
TraceWriter
should use the value returned by the getEnabled
method as
an indication of whether they should invoke the print
and println
methods at all.
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases any resources associated by this
TraceWriter . |
void |
flush()
Forces output of any messages that have been printed using the
println method |
java.lang.String |
getDescription() |
boolean |
getEnabled()
Returns whether the println method will print anything or not.
|
java.lang.String |
getName() |
int[] |
getTraceLevels() |
void |
println(java.lang.String message,
int severity)
Prints the specified string followed by a carriage return The concrete TraceWriter class will
use the severity to block out messages from a particular stream.
|
void |
setTraceLevels(int[] levels)
set the trace levels that will be traced by this TraceWriter
|
void println(java.lang.String message, int severity)
message
- The string to printseverity
- The severity of the trace.Trace
void flush()
println
methodvoid close()
TraceWriter
.boolean getEnabled()
TraceWriter
will always return false
from this method.void setTraceLevels(int[] levels)
levels
- Array of trace levelsTrace
int[] getTraceLevels()
java.lang.String getName()
java.lang.String getDescription()